<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<mesoBoard.Data.Theme>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    
    <fieldset>
        <legend><%= Html.ThemeImage("themes.png") %> Themes</legend>
        
        <label>
            <%= Html.ImageLink("Create Theme", Url.Action("CreateTheme"), Url.ThemeImage("themes.png"), "Create Theme", "image_link") %>
        </label>
        
        <table class="form_table">
            <tr>
                <th>Theme</th>
                <th>Display Name</th>
                <th>Folder Name</th>
                <th>Visible to Users</th>
                <th>Set as Default</th>
                <th></th>
                <th></th>
            </tr>
            
            <%  foreach(Theme t in Model){
                    bool isCurrentTheme = mesoBoard.Services.SiteConfig.BoardTheme.IntValue() == t.ThemeID; %>
                <tr class="<%= isCurrentTheme ? "bg_color3" : "" %>">
                    <td><%= isCurrentTheme ? "<b>(Default)</b> " + t.Name : t.Name %></td>
                    <td><%= t.DisplayName %></td>
                    <td><%= t.FolderName %></td>
                    <td><%= t.VisibleToUsers ? "Yes" : "No" %></td>
                    <td><%= isCurrentTheme ? "<b>Current Default</b>" : Html.ActionLink("Set as Default", "SetThemeDefault", new { ThemeID = t.ThemeID }).ToString()%></td>
                    <td><%= Html.ActionLink("Edit", "EditTheme", new { ThemeID = t.ThemeID}) %></td>
                    <td><%= Html.AdminConfirm("Delete", Url.Action("DeleteTheme", new { ThemeID = t.ThemeID}), Url.Action("Themes")) %></td>
                </tr>
            <%} %>
            
        </table>
             
    </fieldset>
   
</asp:Content>
